<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SSD1306 OLED display driver: HAL: ssd1306 library hardware abstraction layer</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">SSD1306 OLED display driver
   &#160;<span id="projectnumber">1.8.2</span>
   </div>
   <div id="projectbrief">This library is developed to control SSD1306/SSD1331/SSD1351/IL9163/PCD8554 RGB i2c/spi LED displays</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">HAL: ssd1306 library hardware abstraction layer</div>  </div>
</div><!--header-->
<div class="contents">

<p>i2c/spi ssd1306 library hardware abstraction layer  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structssd1306__platform__i2c_config__t.html">ssd1306_platform_i2cConfig_t</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga57896cfd0f578b584d58e3bef85b0e78"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_s_d1306___h_a_l___a_p_i.html#ga57896cfd0f578b584d58e3bef85b0e78">LCDINT_TYPES_DEFINED</a></td></tr>
<tr class="separator:ga57896cfd0f578b584d58e3bef85b0e78"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad8d0ae08f1f0cc9d28af884dfce17f06"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_s_d1306___h_a_l___a_p_i.html#gad8d0ae08f1f0cc9d28af884dfce17f06">ssd1306_swap_data</a>(a,  b,  type)&#160;&#160;&#160;{ type t = a; a = b; b = t; }</td></tr>
<tr class="separator:gad8d0ae08f1f0cc9d28af884dfce17f06"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga609c6ba2ba635102cd316b7b59af8351"><td class="memItemLeft" align="right" valign="top">typedef int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_s_d1306___h_a_l___a_p_i.html#ga609c6ba2ba635102cd316b7b59af8351">lcdint_t</a></td></tr>
<tr class="separator:ga609c6ba2ba635102cd316b7b59af8351"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3de6a212815ee8499f4042db94992210"><td class="memItemLeft" align="right" valign="top">typedef unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_s_d1306___h_a_l___a_p_i.html#ga3de6a212815ee8499f4042db94992210">lcduint_t</a></td></tr>
<tr class="separator:ga3de6a212815ee8499f4042db94992210"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gabfbc35d9ad49ecfab95ccb34afb0ef81"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_s_d1306___h_a_l___a_p_i.html#gabfbc35d9ad49ecfab95ccb34afb0ef81">ssd1306_platform_i2cInit</a> (int8_t busId, uint8_t addr, <a class="el" href="structssd1306__platform__i2c_config__t.html">ssd1306_platform_i2cConfig_t</a> *cfg)</td></tr>
<tr class="memdesc:gabfbc35d9ad49ecfab95ccb34afb0ef81"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes i2c interface for platform being used.  <a href="#gabfbc35d9ad49ecfab95ccb34afb0ef81">More...</a><br /></td></tr>
<tr class="separator:gabfbc35d9ad49ecfab95ccb34afb0ef81"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga48b3e1e6fc7eec0e0634370746d31c22"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_s_d1306___h_a_l___a_p_i.html#ga48b3e1e6fc7eec0e0634370746d31c22">ssd1306_platform_spiInit</a> (int8_t busId, int8_t cesPin, int8_t dcPin)</td></tr>
<tr class="memdesc:ga48b3e1e6fc7eec0e0634370746d31c22"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes spi interface for platform being used.  <a href="#ga48b3e1e6fc7eec0e0634370746d31c22">More...</a><br /></td></tr>
<tr class="separator:ga48b3e1e6fc7eec0e0634370746d31c22"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>i2c/spi ssd1306 library hardware abstraction layer </p>
<p>ssd1306 library hardware abstraction layer </p>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="ga57896cfd0f578b584d58e3bef85b0e78"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga57896cfd0f578b584d58e3bef85b0e78">&#9670;&nbsp;</a></span>LCDINT_TYPES_DEFINED</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define LCDINT_TYPES_DEFINED</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Macro informs if lcdint_t type is defined </p>

<p class="definition">Definition at line <a class="el" href="io_8h_source.html#l00061">61</a> of file <a class="el" href="io_8h_source.html">io.h</a>.</p>

</div>
</div>
<a id="gad8d0ae08f1f0cc9d28af884dfce17f06"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad8d0ae08f1f0cc9d28af884dfce17f06">&#9670;&nbsp;</a></span>ssd1306_swap_data</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define ssd1306_swap_data</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">a, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">b, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;{ type t = a; a = b; b = t; }</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>swaps content of a and b variables of type type </p>

<p class="definition">Definition at line <a class="el" href="io_8h_source.html#l00069">69</a> of file <a class="el" href="io_8h_source.html">io.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="ga609c6ba2ba635102cd316b7b59af8351"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga609c6ba2ba635102cd316b7b59af8351">&#9670;&nbsp;</a></span>lcdint_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef int lcdint_t</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>internal int type, used by ssd1306 library. Important for uC with low SRAM </p>

<p class="definition">Definition at line <a class="el" href="io_8h_source.html#l00063">63</a> of file <a class="el" href="io_8h_source.html">io.h</a>.</p>

</div>
</div>
<a id="ga3de6a212815ee8499f4042db94992210"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3de6a212815ee8499f4042db94992210">&#9670;&nbsp;</a></span>lcduint_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef unsigned int lcduint_t</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>internal int type, used by ssd1306 library. Important for uC with low SRAM </p>

<p class="definition">Definition at line <a class="el" href="io_8h_source.html#l00065">65</a> of file <a class="el" href="io_8h_source.html">io.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="gabfbc35d9ad49ecfab95ccb34afb0ef81"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gabfbc35d9ad49ecfab95ccb34afb0ef81">&#9670;&nbsp;</a></span>ssd1306_platform_i2cInit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ssd1306_platform_i2cInit </td>
          <td>(</td>
          <td class="paramtype">int8_t&#160;</td>
          <td class="paramname"><em>busId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structssd1306__platform__i2c_config__t.html">ssd1306_platform_i2cConfig_t</a> *&#160;</td>
          <td class="paramname"><em>cfg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initializes i2c interface for platform being used. </p>
<p>Initializes i2c interface for platform being used. i2c implementation depends on platform.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">busId</td><td>i2c bus number. Some platforms have several i2c buses. so, this argument identifies bus to use. For several platforms busId is not used. If you want to use default i2c bus for specific platform, please pass -1. </td></tr>
    <tr><td class="paramname">addr</td><td>i2c address of oled driver, connected to i2c bus. If you want to use default i2c display address, please, pass 0. </td></tr>
    <tr><td class="paramname">cfg</td><td>Specify scl and sda for the platform. If you want to use default pin numbers, please pass -1 for both members. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga48b3e1e6fc7eec0e0634370746d31c22"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga48b3e1e6fc7eec0e0634370746d31c22">&#9670;&nbsp;</a></span>ssd1306_platform_spiInit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ssd1306_platform_spiInit </td>
          <td>(</td>
          <td class="paramtype">int8_t&#160;</td>
          <td class="paramname"><em>busId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int8_t&#160;</td>
          <td class="paramname"><em>cesPin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int8_t&#160;</td>
          <td class="paramname"><em>dcPin</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initializes spi interface for platform being used. </p>
<p>Initializes spi interface for platform being used. spi implementation depends on platform.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">busId</td><td>spi bus number if device has several spi buses. For most AVR platforms busId is not used. If you want to use default spi bus for specific platform, please pass -1. </td></tr>
    <tr><td class="paramname">cesPin</td><td>chip select (chip enable) pin number. If you want to use default pin, hard coded by ssd1306 library, please, pass -1. For Linux platform cesPin means second number in spidev device. </td></tr>
    <tr><td class="paramname">dcPin</td><td>data/command pin number. For most oled displays this pin number is used to select data or command mode for the bus. If you want to use default pin number, please pass -1. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
